<script lang="ts" setup>
import { ref } from 'vue';
import { treeProps, treeEmits } from './tree';
defineOptions({ name: 'WindowsTree' });
const props = defineProps(treeProps);
const emits = defineEmits(treeEmits);
const handleNodeClick = (node: any) => {
  emits('node-click', node);
};
const handleAppClick = (node: any) => {
  emits('app-click', node);
};
const treeData = ref(JSON.parse(JSON.stringify(props.data)));
</script>

<template>
  <div class="windows-tree">
    <windows-tree-node :data="treeData" @node-click="handleNodeClick" @app-click="handleAppClick"></windows-tree-node>
  </div>
</template>

<style scoped lang="scss"></style>
